//
//  JPillCaseBottomView.m
//  JPKY
//
//  Created by Vitas on 2016/11/14.
//  Copyright © 2016年 Vitas. All rights reserved.
//

#import "JPillCaseBottomView.h"
#import "HMAdditions.h"

@interface JPillCaseBottomView ()

/* 添加病例按钮 */
@property (strong, nonatomic) UIButton *button;

@end

@implementation JPillCaseBottomView

- (instancetype)init {
    self = [super init];
    if (self) {
        [self setupUI];
    }
    return self;
}

- (void)setupUI {
    [self addSubview:self.button];
    
    // 设置button文字与颜色
    [self.button setTitle:@"   添加病例" forState:UIControlStateNormal];
    
    [self.button setTitleColor:[UIColor hm_colorWithRed:87 green:199 blue:199] forState:UIControlStateNormal];
    
    [self.button setImage:[UIImage imageNamed:@"add_40x40"] forState:UIControlStateNormal];
    
    self.button.enabled = NO;
    
    [self.button mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(self);
    }];
}

#pragma mark - 懒加载button
- (UIButton *)button {
    if (!_button) {
        _button = [[UIButton alloc] init];
    }
    return _button;
}

@end
